package com.zzu.base.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zzu.base.common.enums.SexEnum;
import com.zzu.base.common.enums.UserStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
@Schema(description = "用户实体信息")
public class UserDO extends BaseDO {
    @TableId(type = IdType.AUTO)
    private Long id;
    @Schema(description = "用户名,不可重复",example = "powder")
    private String userName;

    @Schema(description = "用户昵称,可重复", example = "jinx")
    private String nickName;

    @Schema(description = "用户密码（加密存储）",  example = "$2a$10$xxxxxxxxxxxxxx")
    private String password;

    @Schema(description = "账号状态,0启用,1停用",  example = "0", allowableValues = {"0", "1"})
    private UserStatusEnum status;

    @Schema(description = "用户邮箱", example = "john@example.com")
    private String email;

    @Schema(description = "用户手机号", example = "13800138000")
    private String phoneNumber;

    @Schema(description = "用户性别,0男性,1女性,2未知", example = "0", allowableValues = {"0", "1", "2"})
    private SexEnum sex;

}